package com.hzdl.controller;

import com.hzdl.dao.impl.AccountDaoImpl1;
import com.hzdl.service.impl.AccountServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

@Controller
public class AccountController {

//    AccountService accountService = new AccountServiceImpl();

    @Test
    public void call() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("bean.xml");
//        AccountService accountService = (AccountService) applicationContext.getBean("accountServiceImpl");
        AccountServiceImpl accountServiceImpl = applicationContext.getBean("accountService", AccountServiceImpl.class);
        accountServiceImpl.save();


//        accountService.save();
    }






}
